import java.util.Scanner;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User:22954
 * Date:2024-01-04
 * Time:14:32
 */
public class Test {
    public static void main(String[] args) {
//        exercise1();//递归求N阶乘
//        exercise2();//递归求1+2+……+N
//        exercise3();//按顺序打印数字的每一位（递归）
//        exercise4();//写一个递归方法，输入一个非负整数，返回组成它的数字的和
//        exercise5();//递归求斐波那契数列的第N项
//        exercise6();//创建int型数组，元素100个，把每个元素依次赋值为1-100
        exercise7();//实现一个方法printArray，以数组为参数，循环访问数组中每个元素，打印
    }

    public static void exercise1() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        long ret = fac(n);
        System.out.println(ret);
    }

    public static long fac(int n) {
        if (n == 1) {
            return 1;
        }
        return n * fac(n - 1);
    }

    public static void exercise2() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int ret = sum(n);
        System.out.println(ret);
    }

    public static int sum(int n) {
        if (n == 1) {
            return 1;
        }
        return n + sum(n - 1);
    }

    public static void exercise3() {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        print(num);
    }

    public static void print(int n) {
        if (n / 10 == 0) {
            System.out.print(n + " ");
            return;
        }
        print(n / 10);
        System.out.print(n % 10 + " ");
    }

    public static void exercise4() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int ret = consistSum(n);
        System.out.println(ret);
    }

    public static int consistSum(int n) {
        if (n < 10) {
            return n;
        }
        return n % 10 + consistSum(n / 10);
    }

    public static void exercise5() {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int ret = fib(n);
        System.out.println(ret);
    }

    public static int fib(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        return fib(n - 1) + fib(n - 2);
    }

    public static void exercise6() {
        int[] array = new int[100];
        for (int i = 0; i < 100; i++) {
            array[i] = i + 1;
        }
/*        for(int x:array){
            System.out.print(x+" ");
        }*/
    }

    public static void exercise7() {
        int[] array = new int[100];
        for (int i = 0; i < 100; i++) {
            array[i] = i + 1;
        }
        printArray(array);
    }

    public static void printArray(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i] + " ");
        }
        System.out.println();
    }
}
